/* General layout adjustments */
body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  background-color: #f9f9f9;
  color: #333;
}

button {
  padding: 10px;
  font-size: 16px;
  border-radius: 5px;
  width: 100%; /* Full width for mobile */
}

input {
  padding: 10px;
  font-size: 16px;
  border: 1px solid #5cd65c; /* Green border for health theme */
  border-radius: 5px;
  width: 100%; /* Full width for mobile */
  box-sizing: border-box;
  background-color: var(--input-bg); /* Dynamic background color */
  color: var(--input-text); /* Dynamic text color */
}

label {
  font-size: 14px;
  margin-bottom: 5px;
  display: block;
  color: #28a745; /* Green text for labels */
}

.flex-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 15px; /* Increased gap for better spacing */
}

/* Header styles */
.app-header {
  background: linear-gradient(90deg, #2ecc71, #27ae60); /* Green gradient */
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  font-size: 16px;
  font-weight: bold;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

/* Main container */
.p-4 {
  padding: 10px;
}

.max-w-4xl {
  max-width: 100%; /* Use full width */
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Buttons */
.button-primary {
  background: linear-gradient(90deg, #27ae60, #2ecc71); /* Green gradient */
  color: white;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background-color 0.3s, color 0.3s;
  width: 100%; /* Full width for mobile */
}

.button-primary:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.button-primary:active {
  transform: scale(0.95);
}

/* Status indicator styles */
.status-indicator {
  font-size: 14px;
  font-weight: bold;
  padding: 5px 10px;
  border-radius: 5px;
  color: white;
  display: inline-block;
  margin-top: 10px;
}

.status-live {
  background-color: #cc402e; /* Green for live status */
}

.mt-4 {
  margin-top: 10px;
}

.status-replay {
  background-color: #27ae60; /* Light green for replay status */
}

body.light-mode {
  --input-bg: #ffffff; /* White background for light mode */
  --input-text: #000000; /* Black text for light mode */
  background-color: #ffffff;
  color: #000000;
}

body.dark-mode {
  --input-bg: #333333; /* Dark gray background for dark mode */
  --input-text: #ffffff; /* White text for dark mode */
  background-color: #121212;
  color: #ffffff;
}

/* UID container styles */
.uid-container {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
}

/* Remove hover-based visibility styles for the logout button */
.uid-container .logout-button {
  opacity: 1;
  visibility: visible;
  transition: none;
}

.uid-container:hover .logout-button {
  opacity: 1;
  visibility: visible;
}

/* Responsive adjustments */
@media (min-width: 640px) {
  button {
    width: auto; /* Auto width for larger screens */
  }

  input {
    width: auto; /* Auto width for larger screens */
  }

  label {
    display: inline-block;
    margin-bottom: 0;
  }

  .button-primary {
    width: auto; /* Auto width for larger screens */
  }

  .max-w-4xl {
    max-width: 80%; /* Constrain width on larger screens */
  }
}

@media (max-width: 640px) {
  .recharts-wrapper {
    padding-left: 0; /* Adjust padding when Y-axis is hidden */
  }

  .status-indicator {
    font-size: 12px; /* Smaller font for mobile */
  }

}

/* Footer styles */
.app-footer {
  background: #145a32; /* Dark green */
  color: white;
  text-align: center;
  padding: 15px 10px;
  font-size: 14px;
  margin-top: 20px;
  box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
}

.app-footer p {
  margin: 5px 0;
}

/* Slider styles */
.rc-slider-track {
  background-color: #27ae60 !important; /* Green for slider track */
}

.rc-slider-handle {
  border-color: #27ae60 !important; /* Green for slider handle */
}

/* Login container styles */
.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  background: linear-gradient(135deg, #2ecc71, #27ae60); /* Green gradient background */
  padding: 20px;
  box-sizing: border-box;
}

/* Login content styles */
.login-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #27ae60; /* Semi-transparent white background */
  border-radius: 15px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 900px;
  overflow: hidden;
}

/* Logo container styles */
.logo-container {
  flex: 1;
  text-align: center;
  padding: 40px;
  color: white;
}

.logo {
  width: 120px;
  height: 120px;
  object-fit: contain;
  margin-bottom: 20px;
}

.welcome-text {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 10px;
}

.subtitle {
  font-size: 16px;
  font-weight: 300;
}

/* Login form styles */
.login-form {
  flex: 1;
  background: white;
  padding: 40px;
  border-radius: 0 15px 15px 0;
}

.login-form h2 {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 20px;
  text-align: center;
  color: #27ae60;
}

.login-form label {
  font-size: 14px;
  font-weight: bold;
  color: #333;
  margin-bottom: 5px;
  display: block;
}

.login-form input {
  width: 100%;
  padding: 10px;
  margin-bottom: 15px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 14px;
  box-sizing: border-box;
}

.login-form input:focus {
  border-color: #27ae60;
  outline: none;
  box-shadow: 0 0 5px rgba(39, 174, 96, 0.5);
}

.login-form .button-primary {
  background: linear-gradient(90deg, #27ae60, #2ecc71);
  color: white;
  border: none;
  border-radius: 5px;
  padding: 10px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  width: 100%;
  transition: transform 0.2s, box-shadow 0.2s;
}

.login-form .button-primary:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.login-form .button-primary:active {
  transform: scale(0.95);
}

.login-form .error-message {
  color: #e74c3c;
  font-size: 14px;
  margin-bottom: 15px;
  text-align: center;
}
